import { updateArrayBindingPattern } from "typescript";
export namespace Base {
    const MS_PER_UPDATE = 17;
    let pre = new Date().getTime();
    let lag = 0;
    while (true) {
        const cur = new Date().getTime();
        let delta = cur - pre;
        lag += delta;
        processInput();

        while (lag >= MS_PER_UPDATE) {
            update(delta);
            lag -= MS_PER_UPDATE;
        }
        render();
    }
}

function processInput() {
    console.log('check')
}
function update(dt: number) {
    console.log('think');
}
function render() {
    console.log('view')
}



